<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../css/app.css"/>
		<link rel="stylesheet" type="text/css" href="../css/order.css"/>
		<style type="text/css">		
			.mui-pull-top-pocket {
					top: 120px!important;
				}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
		    <h1 class="mui-title">订单</h1>
		</header>
		<div class="mui-content">
		     <div class="bg"></div>
		     <div class="tab">
		     	<span class="active" data-i="../orders/order-sub1.html">信用购</span>
		     	<b></b>
		     	<span data-i="../orders/order-sub2.html">直接购</span>
		     </div>
		</div>
		<script src="../lib/mui.min.js"></script>
		<script type="text/javascript">
			mui.init()
			if(window.plus) {
						plusReady();
					} else {
						document.addEventListener("plusready", plusReady, false);
					}
					function plusReady(){
							plus.navigator.setStatusBarBackground("#FF7234");
						var subpage=["../orders/order-sub1.html","../orders/order-sub2.html"];
						var sub;
						for(var i=0;i<subpage.length;i++){
							sub=plus.webview.create(subpage[i],subpage[i],{
								top:"120px",
								bottom:"0"
							})
							if(i!==0){
								sub.hide()
							}
							plus.webview.currentWebview().append(sub);
						}

						mui(".tab").on('tap','span',function(){
							if(this.getAttribute('data-i') == subpage[0]) {
										return
							}
							mui("span.active")[0].className="";
							this.className="active";
							plus.webview.show(this.getAttribute('data-i'));
							plus.webview.hide(subpage[0]);
							subpage[0] = this.getAttribute('data-i');
						})
					}
		</script>
	</body>

</html>